/*
 * Copyright © 2018 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
*/

@import "../../../../../styles/variables.scss";

.stop-btn-popover {
  .pipeline-stop-btn {
    padding: 0 12px;
  }
  .popper {
    z-index: 999;
    width: 450px;
    padding: 20px;

    .stop-btn-popover-header {
      display: flex;
      justify-content: space-between;

      strong {
        font-size: 15px;
      }

      .stop-all-btn {
        cursor: pointer;
        width: 105px;
        border: 1px solid $grey-03;
        padding: 5px;
        border-radius: 3px;
        display: flex;
        align-items: center;
        justify-content: center;

        .icon-stop {
          margin-right: 3px;
        }

        .icon-spinner {
          margin-left: 3px;
        }

        &:hover {
          &:not(:disabled) {
            background-color: $grey-07;
          }
        }

        &:disabled {
          opacity: 0.5;
          cursor: not-allowed;
        }
      }
    }

    .stop-btn-popover-table-container {
      overflow-y: scroll;
      overflow-x: hidden;
      max-height: 800px;
    }

    .table.stop-btn-popover-table {
      background-color: white;

      th,
      td {
        font-size: 13px;
        padding: 5px 10px;
        border-bottom: 1px solid $grey-03;
        cursor: auto;
      }

      td:first-child,
      th:first-child {
        padding: 5px 0;
        border-bottom-color: white;
      }

      td {
        text-align: left;
        cursor: pointer;

        a {
          color: $grey-01;
          display: block;
        }

        span.stop-run {
          color: $brand-primary;
        }

        .icon-check {
          color: $green-02;
        }
      }

      tr.current-run-row {
        background-color: rgba($yellow-02, 0.3);

        td:first-child {
          background-color: white;
        }
      }
    }

    fieldset:disabled {
      a {
        opacity: 0.5;
        cursor: not-allowed;
      }
    }
  }
}
